package thread;

public class TreadInfoDemo {
    public static void main(String[] args) {
        Thread main = Thread.currentThread();
        String name = main.getName();
        System.out.println("名字"+name);
        long id = main.getId();
        System.out.println("唯一标识"+id);
        int priority = main.getPriority();//优先级
        System.out.println(priority);
        boolean isAlive = main.isAlive();//是否或者
        System.out.println(isAlive);
        boolean isDeamon = main.isDaemon();//是否守护线程
        System.out.println(isDeamon);
        boolean isIntrrupted = main.isInterrupted();//是否断开
        System.out.println(isIntrrupted);
    }
}
